#include <iostream>

int main()
{
    using namespace std;
    struct inflatable
    {
        char name[20];
        float volume;
        double price;
    };

    //请使用这样的方式声明变量
    inflatable *inf = new inflatable;
    cout << "Please input string into inflatable->name:" << endl;
    cin >> inf->name; //第一种方式
    cout << inf->name << endl;
    cout << "Please input string into inflatable->name:" << endl;
    cin.get(inf->name, 20).get();
    cout << inf->name << endl;

    cout << "Please input string into inflatable->name:" << endl;
    cin.getline(inf->name, 20);
    cout << inf->name << endl;

    delete inf;

    return 0;
}